#!/bin/bash

export TBOX_BUILD_TOP_DIR=$(readlink -f $(dirname $0))
echo "top dir:$TBOX_BUILD_TOP_DIR"

rm -rf build
mkdir build
cd build
cmake \
    -DANDROID_NDK=${ANDROID_NDK_R23b} \
    -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_R23b}/build/cmake/android.toolchain.cmake  \
    -DANDROID_ABI=arm64-v8a \
    -DCMAKE_BUILD_TYPE=Release \
    -DANDROID_NATIVE_API_LEVEL=android-30 \
    -DANDROID_PLATFORM=android-30 \
    -DANDROID_FUNCTION_LEVEL_LINKING=OFF \
    -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-clang \
    -DUSE_AARCH64_ANDROID=ON \
    ..
make -j8



